package eu.scillman.net;

//import eu.scillman.net.tcp.ServerEngine;

/**
 * @deprecated Not yet implemented.
 * @author Jiri Waning
 */
public class Server {
//	private Thread thread;
//	private IServer engine;
//	
//	public Server() {
//		thread = null;
//		engine = null;
//	}
//	
//	public void listen() {
//		if (thread == null) {
//			createEngine();
//			thread = new Thread(engine);
//			thread.setName("Server Engine");
//			thread.start();
//			System.out.println("Started engine!");
//		}
//	}
//	
//	private void createEngine() {
//		System.out.println("Creating server engine...");
//		if (engine == null) {
//			System.out.println("creating engine..");
//			engine = new ServerEngine();
//			System.out.println("Created engine!");
//		}
//	}
//	
//	public void stop() {
//		System.out.println("Stopping server engine...");
//		if (thread != null) {
//			if (engine != null) {
//				engine.shutdown();
////				if (!engine.hold()) {
//					System.out.println("Interrupting server engine thread!");
//					thread.interrupt(); // This is so ugly but apparently we do not have a choice!
////				}
//				engine = null;
//			}
//			thread = null;
//		}
//	}
}
